<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>天气数据可视化平台</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        :root {
            --primary: #6366f1;
            --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
        }

        body {
            background: #f8fafc;
            font-family: 'Segoe UI', system-ui, sans-serif;
            min-height: 100vh;
            margin: 0;
            padding: 2rem;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 3rem;
            opacity: 0;
            animation: fadeIn 0.8s ease-out forwards;
        }

        .title {
            font-size: 2.5rem;
            color: #1e293b;
            margin: 1rem 0;
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .search-box {
            background: white;
            padding: 2rem;
            border-radius: 1.5rem;
            box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
            max-width: 600px;
            margin: 0 auto;
            transform: translateY(20px);
            opacity: 0;
            animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
        }

        .search-form {
            display: flex;
            gap: 1rem;
        }

        .search-input {
            flex: 1;
            padding: 1rem;
            border: 2px solid #e2e8f0;
            border-radius: 0.75rem;
            font-size: 1.1rem;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
        }

        .search-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 0.75rem;
            font-size: 1.1rem;
            cursor: pointer;
            transition: transform 0.2s ease;
        }

        .search-btn:hover {
            transform: translateY(-2px);
        }



        /* 弹窗样式 */
        .overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
            z-index: 999;
        }

        .dialog {
            background: white;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        /* 加载动画 */
        .loader {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 10px auto;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }






        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1 class="title">
                <i class="fas fa-cloud-sun"></i>
                气象数据可视化平台
            </h1>
            <p class="subtitle">空气质量可视化分析图标</p>
        </div>

        <div class="search-box">
            <form class="search-form" method="POST">
                <input type="text"
                       class="search-input"
                       name="city"
                       placeholder="请输入城市名称"
                       required>
                <button onclick="showLoading()" type="submit" class="search-btn">
                    立即查询
                    <i class="fas fa-search"></i>
                </button>
            </form>
        </div>
    </div>




<div id="loadingOverlay" class="overlay">
        <div class="dialog">
            <div class="loader"></div>
            <p>数据正在获取请稍后......</p>
            <p>预计等待10秒，根据用户网络环境不同，具体等待时间有所差异</p>
        </div>
    </div>

    <script>
        function showLoading() {
            // 显示加载弹窗
            const overlay = document.getElementById('loadingOverlay');
            overlay.style.display = 'flex';

            // 模拟10秒后关闭（实际使用时可以替换为真实的请求完成回调）
            setTimeout(() => {
                overlay.style.display = 'none';
                // 这里可以添加获取数据完成后的后续操作
                alert('数据获取完成！');
            }, 5000); // 10秒后自动关闭
        }
    </script>





</body>
</html>